/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 combat_user_action.h

	$Header: /heroes4/combat_user_action.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( COMBAT_USER_ACTION_H_INCLUDED )
#define COMBAT_USER_ACTION_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
#include "combat_user_action_ptr.h"
#include "screen_point.h"

class	t_battlefield;
class	t_combat_creature;
enum	t_combat_cursor_mode;
class	t_mouse_window;

// -----------------------------------------------------------------
// structure that holds information about what will happen when
// a left-click occurs.
// -----------------------------------------------------------------
class t_combat_user_action : public t_counted_object
{
public:
	t_combat_user_action( t_screen_point const& point );
	virtual ~t_combat_user_action();

	virtual void					execute( t_battlefield& battlefield ) const = 0;
	virtual t_combat_cursor_mode	get_action() const = 0;
	virtual t_mouse_window*			get_cursor( t_battlefield&	battlefield, 
												std::string&	help_text ) = 0;
	t_screen_point const&			get_screen_point() const;
protected:
	t_screen_point	m_screen_point;
};

inline t_combat_user_action::t_combat_user_action( t_screen_point const& point )
{
	m_screen_point = point;

}

inline t_screen_point const& t_combat_user_action::get_screen_point() const
{
	return m_screen_point;
}


t_combat_user_action_ptr compare_user_actions( t_combat_user_action* old_action,
											   t_combat_user_action* new_action );
t_combat_user_action_ptr get_combat_user_action( t_battlefield&			battlefield, 
												 t_screen_point const&	screen_point,
												 t_combat_creature*		target );


#endif // COMBAT_USER_ACTION_H_INCLUDED